package com.ymatou.iapi.payment.testcase;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.TreeMap;

import org.apache.commons.lang3.StringEscapeUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.godmch.parameter.SetPayModeBean;
import com.ymatou.iapi.payment.parameter.AcquireOrderBean;
import com.ymatou.iapi.payment.parameter.HbFq;
import com.ymatou.iapi.payment.parameter.PayOrderEnum;
import com.ymatou.iapi.payment.parameter.TouTiaoAliPayParam;
import com.ymatou.iapi.payment.parameter.TouTiaoPaymentResult;
import com.ymatou.iapi.payment.service.AcquireOrderCall;
import com.ymatou.mq.admin.parameter.MessageListBean;
import com.ymt.core.tool.FormatUtil;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymt.utils.tag.P2;
import com.ymt.utils.tag.P3;
import com.ymttest.business.data.Sign;
import com.ymttest.business.service.MqQueryCallService;
import com.ymttest.business.service.PayGateWayCallService;
import com.ymttest.business.service.shenqi.GodmchManageCallService;
import com.ymttest.common.enums.BankIdEnum;
import com.ymttest.database.model.MCmbaggrement;
import com.ymttest.database.model.MPayment;
import com.ymttest.database.sqlwapper.JUserWapper;
import com.ymttest.database.sqlwapper.PayGateWayWapper;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.TestDataManager;
import com.ymttest.utils.YMTDateUtil;

/**
 * 支付收单接口 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_AcquireOrder {
	private static AcquireOrderBean acquireorderBean;
	private static AcquireOrderCall acquireorderCall;
	private static PayGateWayWapper pdw;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("支付收单接口");
	}

	@Before
	public void caseUp() {
		acquireorderBean = new AcquireOrderBean();
		acquireorderCall = new AcquireOrderCall();
		pdw = new PayGateWayWapper();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(acquireorderCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	/**
	 * 初始化一个AcquireOrderBean
	 * 
	 * @return AcquireOrderBean
	 */
	public AcquireOrderBean initAcquireOrder() {
		String orderid = TestDataManager.getClientpaymentId();
		String payPrice = String.valueOf(new Random().nextInt(10) + 1);
		String productName = "自动化测试商品" + TestDataManager.randomStr(10);
		String uid = String.valueOf(new Random().nextInt(100000) + 1000);
		String ip = TestDataManager.getRandomIp();
		acquireorderBean.setAppId("AutoTest");
		acquireorderBean.setBankId(BankIdEnum.CMB.name());
		// 定金或者支付
		acquireorderBean.setBizCode("3");
		acquireorderBean.setCallbackUrl("http://www.ymatou.com/pay/result");
		acquireorderBean.setCurrency("CNY");
		acquireorderBean.setEncoding("65001");
		acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
		acquireorderBean.setNotifyUrl("http://api.trading.operate.ymatou.com/api/Trading/TradingCompletedNotify");
		acquireorderBean.setOrderId(orderid);
		acquireorderBean.setOrderTime(YMTDateUtil.getSysTime("yyyyMMddHHmmss"));
		acquireorderBean.setOriginAppId("AutoTest");
		acquireorderBean.setPayPrice(payPrice);
		acquireorderBean.setPayType("13");
		if(PayGateWayCallService.OpenYangYi){
			acquireorderBean.setPayType("1013");
		}
		acquireorderBean.setProductName(productName);
		acquireorderBean.setSignMethod("RSA");
		acquireorderBean.setTraceId(TestDataManager.getRandomUUID().toString());
		acquireorderBean.setUserId(uid);
		acquireorderBean.setUserIp(ip);
		acquireorderBean.setVersion("1");
		acquireorderBean.setMemo("备注:" + TestDataManager.getRandomNum(3));
		return acquireorderBean;
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_001() {
		Logger.start(true, "10支付宝PC支付收单,bizcode3,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result");
			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_002() {
		Logger.start(true, "10支付宝PC支付收单,订单为非杭保订单,paymethod1,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":0}");
			acquireorderBean.setPayType("10");
			acquireorderBean.setBizCode("60");
			PayGateWayCallService.initType(acquireorderBean);
			// 设置了ThirdPartyUserId default_login Y
			acquireorderBean.setThirdPartyUserId(TestDataManager.getRandomUUID().toString());
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result");
			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_003() {
		Logger.start(true, "10支付宝PC支付收单,订单为非杭保订单,paymethod3,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"3\",\"PAYMETHOD\":\"3\", \"IsHangZhou\":0}");
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			// Map m=(Map)
			// FormatUtil.GSONToObject(acquireorderCall.getString("Result"),
			// Map.class);
			String result = acquireorderCall.getString("Result");
			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_004() {
		Logger.start(true, "11.支付宝WAP支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"3\",\"PAYMETHOD\":\"3\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("11");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Query", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			Logger.comment("验证Result报文");
			Logger.verifyNotNull(acquireorderCall.getString("Result"), "验证支付宝WAP跳转链接非空");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_005() {
		Logger.start(true, "13.支付宝-APP支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("13");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyAlipayApp(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_006() {
		Logger.start(true, "13.支付宝-APP支付收单,订单为非杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":0}");
			acquireorderBean.setPayType("13");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyAlipayApp(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_007() {
		Logger.start(true, "14.微信-JSAPI支付收单,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("14");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_008() {
		Logger.start(true, "15.微信支付收单,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("15");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_009() {
		Logger.start(false, "不输入AppId,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setAppId(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME code message
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("appId should not be empty", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_010() {
		Logger.start(false, "不输入sign,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME 内部站不验签
			// Logger.verifyEquals("-5000",
			// acquireorderCall.getString("ErrorCode").toString(),
			// "验证ErrorCode");
			// Logger.verifyIsContains("compairSignedMsg should not be null",
			// acquireorderCall.getString("ErrorMessage"),
			// "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_011() {
		Logger.start(false, "paytype10,输入错误sign,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("10");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign + 1);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME 内部站不验签
			// Logger.verifyEquals("-2001",
			// acquireorderCall.getString("ErrorCode").toString(),
			// "验证ErrorCode");
			// Logger.verifyIsContains("sign not match",
			// acquireorderCall.getString("ErrorMessage"),
			// "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_012() {
		Logger.start(false, "不输入PayType,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME errorcode change
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("payType should not be empty", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	@Ignore
	// mysql重构去除
	public void Tc_AcquireOrder_013() {
		Logger.start(false, "不输入Currency,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setCurrency(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("9999", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("EntityValidationErrors", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_014() {
		Logger.start(false, "不输入Encoding,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setEncoding(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME errorcode message
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("encoding should not be empty", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_015() {
		Logger.start(false, "不输入NotifyUrl,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setNotifyUrl(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("9999", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("EntityValidationErrors", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_016() {
		Logger.start(false, "不输入OrderId,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setOrderId(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();

			// FIXME code message
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("orderId should not be empty", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	@Ignore
	// mysql重构去除
	public void Tc_AcquireOrder_017() {
		Logger.start(false, "不输入OrderTime,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setOrderTime(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("9999", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("EntityValidationErrors", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	@Ignore
	// mysql重构去除
	public void Tc_AcquireOrder_018() {
		Logger.start(false, "不输入OriginAppId,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setOriginAppId(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("9999", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("EntityValidationErrors", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_019() {
		Logger.start(false, "不输入PayPrice,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("payPrice should not be empty", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_020() {
		Logger.start(false, "不输入PayType,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();

			// FIXME code message
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("payType should not be empty", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	@Ignore
	// mysql重构去除
	public void Tc_AcquireOrder_021() {
		Logger.start(false, "不输入ProductName,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setProductName(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("9999", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("EntityValidationErrors", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_022() {
		Logger.start(false, "不输入SignMethod,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setSignMethod(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("9999", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("EntityValidationErrors", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	@Ignore
	// mysql重构去除
	public void Tc_AcquireOrder_023() {
		Logger.start(false, "不输入TraceId,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setTraceId(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("9999", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("EntityValidationErrors", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_024() {
		Logger.start(false, "不输入UserIp,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setUserIp(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("9999", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("EntityValidationErrors", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_025() {
		Logger.start(false, "不输入Version,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setVersion(null);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME code message
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("invalid version", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_026() {
		Logger.start(false, "输入错误Version,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setVersion("-1");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("invalid version", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_027() {
		Logger.start(false, "10:支付宝PC,订单重复,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			acquireorderCall.callService();
			Logger.verifyEquals("5000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			// FIXME Message change
			Logger.verifyIsContains("已经创建过支付单", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_028() {
		// FIXME 11 not support
		// Logger.start(false, "11.支付宝WAP,订单重复,收单失败");
		// try {
		// acquireorderBean = initAcquireOrder();
		// acquireorderBean.setPayType("11");
		// String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
		// acquireorderBean.setSign(sign);
		// acquireorderCall.setData(acquireorderBean);
		// acquireorderCall.callService();
		// acquireorderCall.callService();
		// Logger.verifyEquals("-2106",
		// acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
		// Logger.verifyIsContains("db error",
		// acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		// } catch (Exception e) {
		// Logger.fail(e);
		// }
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_029() {
		Logger.start(false, "13.支付宝APP,订单重复,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("13");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			acquireorderCall.callService();
			Logger.verifyEquals("5000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("已经创建过支付单", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_030() {
		Logger.start(false, "14.微信 JSAP,订单重复,收单失败");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("14");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			acquireorderCall.callService();
			// FIXME message
			Logger.verifyEquals("5000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("已经创建过支付单", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_031() {
		Logger.start(false, "15.微信APP,订单重复,收单失败");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("15");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			acquireorderCall.callService();
			// FIXME message
			Logger.verifyEquals("5000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("已经创建过支付单", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_032() {
		Logger.start(false, "14.微信JSAIP,MOCK return_code Fail result_code Fail ,收单失败");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("14");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "FAIL");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "FAIL");
			acquireorderCall.addHeader("MockResult-WeiXin-return_msg", "MOCK_FAIL_FAIL");
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:FAIL,MockResult-WeiXin-result_code:FAIL,MockResult-WeiXin-return_msg:MOCK_FAIL_FAIL");
			acquireorderCall.callService();
			Logger.verifyEquals("4001", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("MOCK_FAIL_FAIL", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_033() {
		Logger.start(false, "14.微信JSAIP,MOCK return_code Success result_code Fail ,收单失败");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("14");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "FAIL");
			acquireorderCall.addHeader("MockResult-WeiXin-return_msg", "MOCK_SUCCESS_FAIL");
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:FAIL,MockResult-WeiXin-result_code:FAIL,MockResult-WeiXin-return_msg:MOCK_FAIL_FAIL");

			acquireorderCall.callService();
			Logger.verifyEquals("4001", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			// TODO mock没有返回 result error 待加
			// Logger.verifyIsContains("MOCK_SUCCESS_FAIL",
			// acquireorderCall.getString("ErrorMessage"),
			// "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_034() {
		Logger.start(false, "15.微信App,MOCK return_code Fail result_code Fail ,收单失败");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("15");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "FAIL");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "FAIL");
			acquireorderCall.addHeader("MockResult-WeiXin-return_msg", "MOCK_FAIL_FAIL");
			acquireorderCall.callService();
			Logger.verifyEquals("4001", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("MOCK_FAIL_FAIL", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_035() {
		Logger.start(false, "15.微信APP,MOCK return_code Success result_code Fail ,收单失败");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("15");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "FAIL");
			acquireorderCall.addHeader("MockResult-WeiXin-return_msg", "MOCK_SUCCESS_FAIL");
			acquireorderCall.callService();
			Logger.verifyEquals("4001", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			// TODO mock没有返回 result error 待加
			// Logger.verifyIsContains("MOCK_SUCCESS_FAIL",
			// acquireorderCall.getString("ErrorMessage"),
			// "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_036() {
		Logger.start(false, "paytype11,输入错误sign,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("11");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign + 1);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME 内部站不验签
			// Logger.verifyEquals("-2001",
			// acquireorderCall.getString("ErrorCode").toString(),
			// "验证ErrorCode");
			// Logger.verifyIsContains("sign not match",
			// acquireorderCall.getString("ErrorMessage"),
			// "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_037() {
		Logger.start(false, "paytype13,输入错误sign,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("13");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign + 1);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME 内部站不验签
			// Logger.verifyEquals("-2001",
			// acquireorderCall.getString("ErrorCode").toString(),
			// "验证ErrorCode");
			// Logger.verifyIsContains("sign not match",
			// acquireorderCall.getString("ErrorMessage"),
			// "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_AcquireOrder_038() {
		Logger.start(false, "paytype14,输入错误sign,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("14");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign + 1);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME 内部站不验签
			// Logger.verifyEquals("-2001",
			// acquireorderCall.getString("ErrorCode").toString(),
			// "验证ErrorCode");
			// Logger.verifyIsContains("sign not match",
			// acquireorderCall.getString("ErrorMessage"),
			// "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_039() {
		Logger.start(false, "paytype15,输入错误sign,收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("15");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign + 1);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			// FIXME 内部站不验签
			// Logger.verifyEquals("-2001",
			// acquireorderCall.getString("ErrorCode").toString(),
			// "验证ErrorCode");
			// Logger.verifyIsContains("sign not match",
			// acquireorderCall.getString("ErrorMessage"),
			// "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_040() {
		Logger.start(true, "10支付宝PC支付收单bizcode2,不支持此单号,收到失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setBizCode("2");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			Logger.verifyEquals("3104", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("无效的BizCode:2", acquireorderCall.getString("ErrorMessage").toString(), "验证ErrorMessage");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_041() {
		Logger.start(true, "10支付宝PC支付收单,bizcode1,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setBizCode("1");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result");
			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_042() {
		Logger.start(true, "10支付宝PC支付收单,bizcode4,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setBizCode("4");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result");
			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_043() {
		Logger.start(true, "14.微信-JSAPI支付收单,特殊金额2.05,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.05");
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("14");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_044() {
		Logger.start(true, "15.微信支付收单,订单为杭保订单,特殊金额2.05,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("15");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setPayPrice("2.05");
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_045() {
		Logger.start(true, "14.微信-JSAPI支付收单,没有获取到微信openid(微信账号未绑定),收单失败");
		try {
			String uid = "1";
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("14");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			Logger.verifyEquals("5000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("not exist openId.", acquireorderCall.getString("ErrorMessage").toString(), "验证ErrorMessage");

		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_060() {
		Logger.start(true, "50.招行支付收单,订单为杭保订单,paymethod1,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("50");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId("100");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyCMBResult(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_061() {
		Logger.start(true, "16.微信扫描,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("16");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			String qr = "weixin://pay//bizpayurl?pr=UsZ4kmA";
			acquireorderCall.addHeader("MockResult-WeiXin-code_url", qr);

			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("QRCode", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			Logger.verifyEquals(qr, acquireorderCall.getString("Result").toString(), "验证Result");
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_062() {
		Logger.start(true, "60.applepay收单,订单为杭保订单,paymethod1,收单成功");
		try {
			// 现在都是61了
			acquireorderBean = PayGateWayCallService.initAcquireOrder("60");
			// acquireorderBean.setPayType("60");
			acquireorderBean.setUserId("100");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			// Logger.comment("设置此请求调用MOCK系统");
			// acquireorderCall.addHeader("Mock", "1");
			// String mockid=TestDataManager.getRandomUUID().toString();
			// acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Text", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			Logger.verifyNotNull(acquireorderCall.getString("Result"), "验证Result");
			Logger.verifyEquals(21, acquireorderCall.getString("Result").length(), "验证TN长度");
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_063() {
		Logger.start(true, "uid为0收单失败JIRACONN-12501");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId("0");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode"), "验证ErrorCode");
			Logger.verifyEquals(acquireorderBean.getAppId(), acquireorderCall.getString("AppId"), "验证AppId");
			Logger.verifyEquals(acquireorderBean.getTraceId(), acquireorderCall.getString("TraceId").toString(), "验证TraceId");
			Logger.verifyEquals("false", acquireorderCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyIsContains("userid must gte 1", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	//20180628 宝付渠道废弃不再维护
	public void Tc_AcquireOrder_064() {
		Logger.start(true, "70.宝付支付宝支付收单,订单为杭保订单,paymethod1,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("70");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId("100");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			// Logger.comment("设置此请求调用MOCK系统");
			// acquireorderCall.addHeader("Mock", "1");
			// String mockid=TestDataManager.getRandomUUID().toString();
			// acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("BaofooToken", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			Logger.verifyNotNull(acquireorderCall.getString("Result").toString(), "验证Result");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_065() {
		Logger.start(true, "10支付宝PC用RSA加密支付收单,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"3\",\"PAYMETHOD\":\"3\", \"IsHangZhou\":0}");
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setSignMethod("RSA");
			String src = FormatUtil.beanToHttpString(acquireorderBean, false);
			String sign = new Sign().SignSHA1WithRSA(src);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			// Map m=(Map)
			// FormatUtil.GSONToObject(acquireorderCall.getString("Result"),
			// Map.class);
			String result = acquireorderCall.getString("Result");
			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_066() {
		Logger.start(true, "11.支付宝WAP用RSA加密支付收单,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"3\",\"PAYMETHOD\":\"3\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("11");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Query", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			Logger.comment("验证Result报文");
			Logger.verifyNotNull(acquireorderCall.getString("Result"), "验证支付宝WAP跳转链接非空");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_067() {
		Logger.start(true, "JIRACONN-16438新渠道61.applepay收单,订单为杭保订单,paymethod1,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("60");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId("100");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			// Logger.comment("设置此请求调用MOCK系统");
			// acquireorderCall.addHeader("Mock", "1");
			// String mockid=TestDataManager.getRandomUUID().toString();
			// acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Text", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			Logger.verifyNotNull(acquireorderCall.getString("Result"), "验证Result");
			Logger.verifyEquals(21, acquireorderCall.getString("Result").length(), "验证TN长度");
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_068() {
		Logger.start(true, "9.支付宝-花呗支付收单,订单为杭保订单,paymethod2,收单成功JIRACONN-17887");
		try {
			acquireorderBean = PayGateWayCallService.initAcquireOrder("9");
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setInstallmentNum(6);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyAlipayApp(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_069() {
		Logger.start(true, "14.微信-JSAPI支付收单,主动传入openid,订单为杭保订单,paymethod1,收单成功JIRACONN-17887");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setOpenId(TestDataManager.getRandomUUID().toString());
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("14");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_070() {
		Logger.start(true, "14.微信-JSAPI支付收单,本来不存在openid，主动传入openid,订单为杭保订单,paymethod1,收单成功JIRACONN-17887");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = "1";
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setOpenId(TestDataManager.getRandomUUID().toString());
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("14");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
		}
	}

	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_071() {
		Logger.start(true, "9.支付宝-花呗支付收单,InstallmentNum小于0失败，RACONN-17887");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("9");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setInstallmentNum(-1);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			Logger.verifyIsContains("参数异常", acquireorderCall.getString("ErrorMessage"), "验证ErrorMessage包含内容");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_072() {
		Logger.start(true, "0.支付宝-MOCK渠道支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("0");
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			//mock 不使用yangyi渠道所以验证会有错误 手工验证
//			verifyDB(acquireorderBean);
//			verifyAlipayApp(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_073() {
		Logger.start(true, "17.微信-APP支付收单,本来不存在openid，主动传入openid,订单为杭保订单,paymethod1,收单成功JIRACONN-17887");
		try {
			//Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = "1";
			acquireorderBean = PayGateWayCallService.initAcquireOrder("17");
			acquireorderBean.setOpenId(TestDataManager.getRandomUUID().toString());
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
//			acquireorderBean.setPayType("17");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.WX_AppID);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_074() {
		Logger.start(true, "17.微信-APP支付收单,不输入openid,订单为杭保订单,paymethod1,收单成功");
		try {
			//Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = PayGateWayCallService.initAcquireOrder("17");
			acquireorderBean.setOpenId(null);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.WX_AppID);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_075() {
		Logger.start(true, "18.微店直播支付收单,本来不存在openid，主动传入openid,订单为杭保订单,paymethod1,收单成功");
		try {
			//Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = "1";
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setOpenId(TestDataManager.getRandomUUID().toString());
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("18");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.LiveShop_AppId);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_076() {
		Logger.start(true, "18.微店直播支付收单,不输入openid,订单为杭保订单,paymethod1,收单成功");
		try {
			//Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setOpenId(null);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("18");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.LiveShop_AppId);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_077() {
		Logger.start(true, "19.海外直播扫货微信App支付收单,不输入openid,订单为杭保订单,paymethod1,收单成功");
		try {
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("19");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.WX_HS_AppID);
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	//渠道关闭
	public void Tc_AcquireOrder_078() {
		Logger.start(true, "翼支付H5收单,订单为非杭保订单,paymethod1,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":0}");
			acquireorderBean.setPayType("80");
			PayGateWayCallService.initType(acquireorderBean);
			// 设置了ThirdPartyUserId default_login Y
			acquireorderBean.setThirdPartyUserId(TestDataManager.getRandomUUID().toString());
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Query", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result");
			verifyBestpayResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_079() {
		Logger.start(true, "62.upay收单,订单为杭保订单,paymethod1,收单成功");
		try {
			// 现在都是61了
			acquireorderBean = PayGateWayCallService.initAcquireOrder("62");
			// acquireorderBean.setPayType("60");
			acquireorderBean.setUserId("100");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			// Logger.comment("设置此请求调用MOCK系统");
			// acquireorderCall.addHeader("Mock", "1");
			// String mockid=TestDataManager.getRandomUUID().toString();
			// acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Text", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			Logger.verifyNotNull(acquireorderCall.getString("Result"), "验证Result");
			Logger.verifyEquals(21, acquireorderCall.getString("Result").length(), "验证TN长度");
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_080() {
		Logger.start(true, "63.upay收单wap,订单为杭保订单,paymethod1,收单成功");
		try {
			// 现在都是61了
			acquireorderBean = PayGateWayCallService.initAcquireOrder("63");
			// acquireorderBean.setPayType("60");
			acquireorderBean.setUserId("100");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			// Logger.comment("设置此请求调用MOCK系统");
			// acquireorderCall.addHeader("Mock", "1");
			// String mockid=TestDataManager.getRandomUUID().toString();
			// acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			Logger.verifyNotNull(acquireorderCall.getString("Result"), "验证Result");
			String result= acquireorderCall.getString("Result");
			verifyUPayHtmlResult(acquireorderBean, result);
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_081() {
		Logger.start(true, "3017.全球优选-商城-微信小程序支付收单,本来不存在openid，主动传入openid,订单为杭保订单,paymethod1,收单成功JIRACONN-17887");
		try {
			//Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = "1";
			acquireorderBean = PayGateWayCallService.initAcquireOrder("3017");
			acquireorderBean.setBizCode("33");
			acquireorderBean.setOpenId(TestDataManager.getRandomUUID().toString());
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
//			acquireorderBean.setPayType("17");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.WX_QQG_AppID);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_082() {
		Logger.start(true, "3017.全球优选-商城-微信小程序,不输入openid,订单为杭保订单,paymethod1,收单成功");
		try {
			//Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = PayGateWayCallService.initAcquireOrder("3017");
			acquireorderBean.setBizCode("33");
			acquireorderBean.setOpenId(null);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.WX_QQG_AppID);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_083() {
		Logger.start(true, "64小米收单,订单为杭保订单,paymethod1,收单成功");
		try {
			// 现在都是61了
			acquireorderBean = PayGateWayCallService.initAcquireOrder("64");
			// acquireorderBean.setPayType("60");
			acquireorderBean.setUserId("100");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			// Logger.comment("设置此请求调用MOCK系统");
			// acquireorderCall.addHeader("Mock", "1");
			// String mockid=TestDataManager.getRandomUUID().toString();
			// acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Text", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			Logger.verifyNotNull(acquireorderCall.getString("Result"), "验证Result");
			Logger.verifyEquals(21, acquireorderCall.getString("Result").length(), "验证TN长度");
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_084() {
		Logger.start(true, "3013.全球优选-支付宝App支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("3013");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyAlipayApp(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_085() {
		Logger.start(true, "3015全球优选-微信App支付收单,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("3015");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.WX_QQG_AppID);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P1.class)
	@TestCase
	//6 预售订单充值
	public void Tc_AcquireOrder_086() {
		Logger.start(true, "10支付宝PC支付收单,6预售定金充值,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			if(PayGateWayCallService.OpenYangYi){
				PayGateWayCallService.initYangYiMERID();
			}
			acquireorderBean.setBizCode("6");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result");
			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_087() {
		Logger.start(true, "6000.代购神器微信小程序HipoPayWxApp支付收单HKD,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6000");
			acquireorderBean.setAppName("wxsqBuyer");
			acquireorderBean.setSettleCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_088() {
		Logger.start(true, "65HuaweiPay收单,订单为杭保订单,paymethod1,收单成功");
		try {
			acquireorderBean = PayGateWayCallService.initAcquireOrder("65");
			// acquireorderBean.setPayType("60");
			acquireorderBean.setUserId("100");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			// Logger.comment("设置此请求调用MOCK系统");
			// acquireorderCall.addHeader("Mock", "1");
			// String mockid=TestDataManager.getRandomUUID().toString();
			// acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Text", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			Logger.verifyNotNull(acquireorderCall.getString("Result"), "验证Result");
			Logger.verifyEquals(21, acquireorderCall.getString("Result").length(), "验证TN长度");
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_089() {
		Logger.start(true, "66SamSungPay收单,订单为杭保订单,paymethod1,收单成功");
		try {
			acquireorderBean = PayGateWayCallService.initAcquireOrder("66");
			// acquireorderBean.setPayType("60");
			acquireorderBean.setUserId("100");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			// Logger.comment("设置此请求调用MOCK系统");
			// acquireorderCall.addHeader("Mock", "1");
			// String mockid=TestDataManager.getRandomUUID().toString();
			// acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Text", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			Logger.verifyNotNull(acquireorderCall.getString("Result"), "验证Result");
			Logger.verifyEquals(21, acquireorderCall.getString("Result").length(), "验证TN长度");
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_090() {
		Logger.start(true, "6000.代购神器微信小程序HipoPayWxApp支付收单不输入SettleCurrency失败");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6000");
			acquireorderBean.setAppName("wxsqBuyer");
			acquireorderBean.setSettleCurrency(null);
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			Logger.verifyEquals("false", acquireorderCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode"), "验证ErrorCode");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_091() {
		Logger.start(true, "6000.代购神器微信小程序HipoPayWxApp支付收单不输入AppName失败");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6000");
//			acquireorderBean.setAppName("autotest");
			acquireorderBean.setSettleCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			Logger.verifyEquals("false", acquireorderCall.getString("IsSuccess"), "验证IsSuccess");
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode"), "验证ErrorCode");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_092() {
		//8是花呗 9是花呗分期
		Logger.start(true, "8.支付宝-花呗支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = PayGateWayCallService.initAcquireOrder("8");
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setInstallmentNum(6);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyAlipayApp(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_093() {
		Logger.start(true, "6000.代购神器微信小程序HipoPayWxApp支付收单HKD,PriceCurrency为HKD,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.15");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6000");
			acquireorderBean.setAppName("wxsqBuyer");
			acquireorderBean.setSettleCurrency("HKD");
			acquireorderBean.setPriceCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_094() {
		Logger.start(true, "6000.代购神器微信小程序HipoPayWxApp支付收单HKD,PriceCurrency为USD失败,币种不一致");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6000");
			acquireorderBean.setAppName("wxsqBuyer");
			acquireorderBean.setSettleCurrency("HKD");
			acquireorderBean.setPriceCurrency("USD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode"), "验证ErrorCode");
			Logger.verifyEquals("false", acquireorderCall.getString("IsSuccess"), "验证IsSuccess");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_095() {
		Logger.start(true, "6000.代购神器微信小程序HipoPayWxApp支付收单HKD,外币JPY不支持小数点");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.15");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6000");
			acquireorderBean.setAppName("wxsqBuyer");
			acquireorderBean.setSettleCurrency("JPY");
			acquireorderBean.setPriceCurrency("JPY");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode"), "验证ErrorCode");
			Logger.verifyEquals("false", acquireorderCall.getString("IsSuccess"), "验证IsSuccess");
			//ErrorMessage":"参数异常|币种：JPY不允许支付小数金额"
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_096() {
		Logger.start(true, "6001.代购神器微信小程序HipoPayWxApp支付收单HKD,PriceCurrency为HKD,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.15");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxH5OpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6001");
			acquireorderBean.setAppName("wxsqBuyer");
			acquireorderBean.setSettleCurrency("HKD");
			acquireorderBean.setPriceCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_097() {
		Logger.start(true, "6001.代购神器微信小程序HipoPayWxH5支付收单HKD,外币JPY不支持小数点");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.15");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6001");
			acquireorderBean.setAppName("h5sqBuyer");
			acquireorderBean.setSettleCurrency("JPY");
			acquireorderBean.setPriceCurrency("JPY");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			Logger.verifyEquals("1000", acquireorderCall.getString("ErrorCode"), "验证ErrorCode");
			Logger.verifyEquals("false", acquireorderCall.getString("IsSuccess"), "验证IsSuccess");
			//ErrorMessage":"参数异常|币种：JPY不允许支付小数金额"
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_098() {
		Logger.start(true, "6000.代购神器微信小程序HipoPayWxApp支付收单HKD,订单为杭保订单,paymethod1,收单成功-带appname");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6000");
			acquireorderBean.setAppName("wxsqBuyer");
			acquireorderBean.setSettleCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_099() {
		Logger.start(true, "6000.代购神器微信小程序HipoPayWxApp支付收单HKD,订单为杭保订单,paymethod1,收单成功-带appname-独立小程序");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6000");
			acquireorderBean.setAppName(PayGateWayCallService.PayGdSq.toString());
			acquireorderBean.setSettleCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	//用户已经切换到线上-SIT不支持支付了
	public void Tc_AcquireOrder_100() {
		Logger.start(true, "90分期乐支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = PayGateWayCallService.initAcquireOrder("90");
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setInstallmentNum(6);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyFql(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_101() {
		Logger.start(true, "3115全球优选-微信App支付收单,订单为杭保订单,paymethod1,收单成功-Cloud");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("3115");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.WX_QQG_AppID_Could_15);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_102() {
		Logger.start(true, "3117.全球优选-商城-微信小程序支付收单,本来不存在openid，主动传入openid,订单为杭保订单,paymethod1,收单成功-Cloud");
		try {
			//Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = "1";
			acquireorderBean = PayGateWayCallService.initAcquireOrder("3117");
			acquireorderBean.setBizCode("33");
			acquireorderBean.setOpenId(TestDataManager.getRandomUUID().toString());
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
//			acquireorderBean.setPayType("17");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.WX_QQG_AppID_Could_17);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_103() {
		Logger.start(true, "3113.全球优选-支付宝App支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("3113");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyAlipayAppYoungCloud(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_104() {
		Logger.start(true, "3213.鱼多多全球优选-支付宝App支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("3213");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyAlipayAppYoungCloud(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_105() {
		Logger.start(true, "3215鱼多多全球优选-微信App支付收单,订单为杭保订单,paymethod1,收单成功-Cloud");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("3215");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			acquireorderCall.addHeader("MockResult-WeiXin-appid", PayGateWayCallService.WX_QQG_AppID_Could_15_YDD);
			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_106() {
		Logger.start(true, "2013.抖音支付宝支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("2013");
			acquireorderBean.setOpenId(PayGateWayCallService.TouTiaoOpenId);
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String r=acquireorderCall.getString("Result").toString();
			String r2 = StringEscapeUtils.unescapeJava(r);
			verifyTouTiao(acquireorderBean, r2);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
//	@Ignore
	//用户已经切换到线上-SIT不支持支付了
	public void Tc_AcquireOrder_107() {
		Logger.start(true, "91分期乐微信小程序支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = PayGateWayCallService.initAcquireOrder("91");
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setInstallmentNum(6);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Query", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
//			verifyFql(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	//2603:9000:5f13:7705:2d21:78d1:7c6d:e46f
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_108() {
		Logger.start(true, "10支付宝PC支付收单,bizcode3,订单为杭保订单,paymethod2,收单成功-长ip导致入库失败bug");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("10");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserIp("2603:9000:5f13:7705:2d21:78d1:7c6d:e46f");
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result");
			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	//6002代替6001
	@Ignore
	public void Tc_AcquireOrder_109() {
		Logger.start(true, "6002.代购神器微信小程序HipoPayWxApp支付收单HKD,PriceCurrency为HKD,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.15");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxH5OpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6002");
			acquireorderBean.setAppName("wxsqBuyer");
			acquireorderBean.setSettleCurrency("HKD");
			acquireorderBean.setPriceCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	//6002代替6001
	@Ignore
	//现在走配置paychannel决定渠道
	public void Tc_AcquireOrder_110() {
		Logger.start(true, "6002.代购神器微信小程序HipoPayWxApp支付收单HKD,PriceCurrency为HKD,订单为杭保订单,paymethod1,收单成功-传指定mchid且AppName为h5sqBuyer");
		try {
			//使用指定参数mchid会让6001渠道自动指向6002
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.15");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxH5OpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6001");
			acquireorderBean.setAppName("h5sqBuyer");
			acquireorderBean.setSettleCurrency("HKD");
			acquireorderBean.setPriceCurrency("HKD");
			acquireorderBean.setMchId(500680446);
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			acquireorderBean.setPayType("6002");
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_111() {
		Logger.start(true, "6001.代购神器微信小程序HipoPayWxApp支付收单HKD,PriceCurrency为HKD,订单为杭保订单,paymethod1,收单成功-传指定mchid但是AppName不为h5sqBuyer");
		try {
			//使用指定参数mchid会让6001渠道自动指向6002
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.15");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxH5OpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6001");
			acquireorderBean.setAppName(PayGateWayCallService.PayGdSq.toString());
			acquireorderBean.setSettleCurrency("HKD");
			acquireorderBean.setPriceCurrency("HKD");
			acquireorderBean.setMchId(PayGateWayCallService.TestMchId);
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
//			acquireorderBean.setPayType("6002");
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_112() {
		Logger.start(true, "6010盛付通微信小程序支付收单,bizcode3,订单为杭保订单,paymethod2,收单成功-mock");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("6010");
			acquireorderBean.setOpenId(TestDataManager.getRandomUUID().toString());
			acquireorderBean.setAppName("wxsqBuyer");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			String prePayId=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockResult-ShengPay-returnCode", "00");
			acquireorderCall.addHeader("MockResult-ShengPay-prepayId", prePayId);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result").replaceAll("\r|\n|\t", "");
			verifySFTResult(acquireorderBean, result,prePayId);
//			String result = acquireorderCall.getString("Result");
//			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_113() {
		Logger.start(true, "6011盛付通微信公众号支付收单,bizcode3,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("6011");
			acquireorderBean.setOpenId(TestDataManager.getRandomUUID().toString());
			acquireorderBean.setAppName("wxsqBuyer");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			String prePayId=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockResult-ShengPay-returnCode", "00");
			acquireorderCall.addHeader("MockResult-ShengPay-prepayId", prePayId);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result").replaceAll("\r|\n|\t", "");
			verifySFTResult(acquireorderBean, result,prePayId);
//			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_114() {
		Logger.start(true, "6010盛付通微信小程序支付收单,bizcode3,订单为杭保订单,paymethod2,收单成功-sft");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("6010");
			acquireorderBean.setOpenId(PayGateWayCallService.SFTWxOpenId);
			acquireorderBean.setAppName("wxsqBuyer");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			String result = acquireorderCall.getString("Result").replaceAll("\r|\n|\t", "");
			verifySFTResult(acquireorderBean, result,null);
//			String result = acquireorderCall.getString("Result");
//			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_AcquireOrder_115() {
		Logger.start(true, "6010盛付通微信小程序支付收单,bizcode3,订单为杭保订单,paymethod2,returnCode02收单失败");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayType("6010");
			acquireorderBean.setAppName("wxsqBuyer");
			acquireorderBean.setOpenId(TestDataManager.getRandomUUID().toString());
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			String prePayId=TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockResult-ShengPay-returnCode", "02");
			acquireorderCall.addHeader("MockResult-ShengPay-prepayId", prePayId);
			acquireorderCall.callService();
			Logger.verifyEquals("4001", acquireorderCall.getString("ErrorCode").toString(), "验证ErrorCode");
			//第三方收单失败
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_146() {
		Logger.start(true, "6006.代购神器HipoPayAliWap支付收单,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.15");
			acquireorderBean.setSettleCurrency("HKD");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxH5OpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6006");
			acquireorderBean.setAppName("wxsqBuyer");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Query", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_147() {
		Logger.start(true, "6100GodAliPayPc支付收单,订单为非杭保订单,paymethod3,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"3\",\"PAYMETHOD\":\"3\", \"IsHangZhou\":0}");
			acquireorderBean.setPayType("6100");
			PayGateWayCallService.initType(acquireorderBean);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Form", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			// Map m=(Map)
			// FormatUtil.GSONToObject(acquireorderCall.getString("Result"),
			// Map.class);
			String result = acquireorderCall.getString("Result");
			verifyHtmlResult(acquireorderBean, result);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_148() {
		Logger.start(true, "6103.HipoPay-微信app支付收单HKD,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
//			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6103");
			acquireorderBean.setAppName("appsqSeller");
			acquireorderBean.setSettleCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
//			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
//			acquireorderCall.addHeader("Mock", "1");
//			String mockid = TestDataManager.getRandomUUID().toString();
//			acquireorderCall.addHeader("MockId", mockid);
//			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
//			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
//			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_149() {
		Logger.start(true, "6107.HipoPay-支付宝app支付收单HKD,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
//			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxAppOpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6107");
			acquireorderBean.setAppName("appsqSeller");
			acquireorderBean.setSettleCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
//			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
//			Logger.comment("设置此请求调用MOCK系统");
//			acquireorderCall.addHeader("Mock", "1");
//			String mockid = TestDataManager.getRandomUUID().toString();
//			acquireorderCall.addHeader("MockId", mockid);
//			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
//			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
//			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Query", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
//			verifyAlipayApp(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	private void verifySFTResult(AcquireOrderBean acqbean, String result,String prePayId) {
		Logger.comment("验证支付宝APP Result报文");
		HashMap mext = (HashMap) FormatUtil.GSONToObject(acqbean.getExt(), HashMap.class);
		int isHangzhou = Double.valueOf(mext.get("IsHangZhou").toString()).intValue();
		Map sftmapResult = (Map) FormatUtil.GSONToObject(result, Map.class);
//		Logger.debug(sftmapResult);
		//{timeStamp=1533609019, packageValue=Sign=WXPay, appId=wxdf111111111111, sign=B9HuO1d98d0gc3ZjQP/ sevdjGAXAeL49Dw==, partnerId=111111111, prepayId=00bf68ff-1060-4dea-906c-a2016da70987, nonceStr=ElrpWvypbpj8h9RfHLAwCFAnJX3Zx8u8}
		Logger.verifyNotNull(sftmapResult.get("timeStamp"),"验证timeStamp");
//		Logger.verifyEquals(sftmapResult.get("packageValue").toString(), "Sign=WXPay", "验证packageValue");
		Logger.verifyNotNull(sftmapResult.get("appId"),"验证appId");
		if(PayGateWayCallService.SFTWxOpenId.equals(acqbean.getOpenId())) {
			//真实报文
			Logger.verifyNotNull(sftmapResult.get("paySign"),"验证paySign");
			Logger.verifyNotNull(sftmapResult.get("package"),"验证package");
		}
		//prePayId 业务校验-需要搞真实的微信prePayId
//		if(prePayId!=null) {
//			Logger.verifyEquals(sftmapResult.get("prepayId"),prePayId,"验证prepayId");
//		}
		Logger.verifyNotNull(sftmapResult.get("nonceStr"),"验证nonceStr");
	}
	@Test
	@Category(P2.class)
	@TestCase
	@Ignore
	public void Tc_AcquireOrder_150() {
		Logger.start(true, "6001.代购神器微信小程序HipoPayWxApp支付收单HKD,PriceCurrency为HKD,订单为杭保订单,paymethod1,收单成功-使用盛付通配置seller");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			Integer mchId = GodmchManageCallService.CreateSellerMch();
			SetPayModeBean setpaymodeBean = GodmchManageCallService.initSetPayModeBean(mchId);
			setpaymodeBean.setPayMode(3);
			setpaymodeBean.setAliPayMode(0);
			GodmchManageCallService.SetPayModeCall(setpaymodeBean);
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setMchId(mchId);
			acquireorderBean.setPayPrice("2.15");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxH5OpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6001");
			acquireorderBean.setAppName("h5sqBuyer");
			acquireorderBean.setSettleCurrency("HKD");
			acquireorderBean.setPriceCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			Logger.comment("验证表pp_payment");
			MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acquireorderBean.getOrderId()).get(0);
			//支付收单 如果是6001-h5sqBuyer，会去查询商户信息，如果发现配置了 盛付通 会路由到 6011，现在改成路由到6002
			Logger.verifyEquals("6002", ppm.getPayType().toString(), "验证PayType");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	//6002代替6001
	public void Tc_AcquireOrder_151() {
		Logger.start(true, "6003.飞界国际电子贸易支付收单HKD,PriceCurrency为HKD,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setPayPrice("2.15");
			//o2q5Z5MV02lePMGBBOk6WRr_wW1w
			acquireorderBean.setOpenId(PayGateWayCallService.HipoPayWxH5OpenId);
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("6003");
			acquireorderBean.setAppName("h5sqBuyer");
			acquireorderBean.setSettleCurrency("HKD");
			acquireorderBean.setPriceCurrency("HKD");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
//			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyWeixin(acquireorderBean, acquireorderCall.getString("Result").toString());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_152() {
		Logger.start(true, "4013.百度支付宝-APP支付收单,订单为杭保订单,paymethod2,收单成功");
		try {
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"2\",\"PAYMETHOD\":\"2\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("4013");
			PayGateWayCallService.initType(acquireorderBean);
			PayGateWayCallService.initYMatouMERID();
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("JSON", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			verifyDB(acquireorderBean);
			verifyAlipayApp(acquireorderBean, acquireorderCall.getString("Result").toString());
			if(PayGateWayCallService.OpenYangYi){
				PayGateWayCallService.initYangYiMERID();
			}
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category(P2.class)
	@TestCase
	public void Tc_AcquireOrder_153() {
		Logger.start(true, "4016.百度微信扫描,订单为杭保订单,paymethod1,收单成功");
		try {
			// Map m = new DefaultWapper().selectLastWeixinUser();
			String uid = new JUserWapper().selectWXUser().getUserId().toString();
			acquireorderBean = initAcquireOrder();
			acquireorderBean.setExt("{\"SHOWMODE\":\"1\",\"PAYMETHOD\":\"1\", \"IsHangZhou\":1}");
			acquireorderBean.setPayType("4016");
			PayGateWayCallService.initType(acquireorderBean);
			acquireorderBean.setUserId(uid);
			String sign = new Sign().signMd5(acquireorderBean, Sign.autoTestKey);
			acquireorderBean.setSign(sign);
			acquireorderCall.setData(acquireorderBean);
			Logger.comment("设置此请求调用MOCK系统");
			acquireorderCall.addHeader("Mock", "1");
			String mockid = TestDataManager.getRandomUUID().toString();
			acquireorderCall.addHeader("MockId", mockid);
			acquireorderCall.addHeader("MockResult-WeiXin-return_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-result_code", "SUCCESS");
			acquireorderCall.addHeader("MockResult-WeiXin-total_fee", new BigDecimal(acquireorderBean.getPayPrice()).multiply(BigDecimal.valueOf(100)).setScale(2).toString());
			String qr = "weixin://pay//bizpayurl?pr=UsZ4kmA";
			acquireorderCall.addHeader("MockResult-WeiXin-code_url", qr);

			Logger.comment("Mock:1,MockResult-WeiXin-return_code:SUCCESS,MockResult-WeiXin-result_code:SUCCESS");
			acquireorderCall.callService();
			verifyDefReturn();
			Logger.verifyEquals("Query", acquireorderCall.getString("ResultType").toString(), "验证ResultType");
			Logger.verifyIsContains("redirect_url", acquireorderCall.getString("Result").toString(), "验证Result");
			verifyDB(acquireorderBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	private void verifyTouTiao(AcquireOrderBean acqbean, String result) throws Exception {
		Logger.comment("验证支付宝APP Result报文");
		HashMap mext = (HashMap) FormatUtil.GSONToObject(acqbean.getExt(), HashMap.class);
		int isHangzhou = Double.valueOf(mext.get("IsHangZhou").toString()).intValue();
		TouTiaoPaymentResult touTiaoPaymentResult = (TouTiaoPaymentResult) FormatUtil.GSONToObject(acquireorderCall.getString("Result"), TouTiaoPaymentResult.class);
		TouTiaoAliPayParam touTiaoAliPayParam=(TouTiaoAliPayParam) FormatUtil.GSONToObject(touTiaoPaymentResult.getParams(), TouTiaoAliPayParam.class);
		Logger.debug("touTiaoAliPayParam:"+FormatUtil.beanToGSONString(touTiaoAliPayParam));
		Logger.verifyNotNull(touTiaoPaymentResult.getSign(), "验证Sign非空");
		Logger.verifyEquals(PayGateWayCallService.TouTiao_MERID, touTiaoPaymentResult.getMerchantId(), "验证MerchantId");
		Logger.verifyEquals(PayGateWayCallService.TouTiao_AppId, touTiaoPaymentResult.getAppId(), "验证appId");
		Logger.verifyEquals("tp.trade.confirm", touTiaoPaymentResult.getMethod(), "验证Method");
		Logger.verifyEquals(acqbean.getOpenId(), touTiaoPaymentResult.getUid(), "验证Uid");
		Logger.verifyEquals("ALIPAY_NO_SIGN", touTiaoPaymentResult.getPayChannel(), "验证PayChannel");
		Logger.verifyEquals("ALIPAY_APP", touTiaoPaymentResult.getPayType(), "验证PayType");
		Logger.verifyEquals("MD5", touTiaoPaymentResult.getSignType(), "验证SignType");
		Logger.verifyEquals(new BigDecimal(acqbean.getPayPrice()).multiply(new BigDecimal(100)).longValue(), touTiaoPaymentResult.getTotalAmout(), "验证TotalAmout");
		Logger.verifyNotNull( touTiaoPaymentResult.getTradeNo(), "验证头条TradeNo非空");
		MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
		String trandno = ppm.getPaymentId();
//		Map m = (Map) FormatUtil.GSONToObject(touTiaoAliPayParam.getUrl(), Map.class);
		Map m =FormatUtil.httpStringToMapSplitAnd(StringEscapeUtils.unescapeJava(touTiaoAliPayParam.getUrl()));
		Logger.debug(m);
		Logger.verifyEquals("\""+acqbean.getProductName()+"\"", m.get("subject"), "验证subject");
		String env = EnvSetup.getEnv();
		String port = "8380";
		if (env.toLowerCase().equals("sit1")) {
			env = "sit";
			port = "8380";
		} else if (env.toLowerCase().equals("uat")) {
			port = "8480";
		}
		Logger.verifyEquals("\"http://" + env + ".payment.ymatou.com:" + port + "/notify/" + (acqbean.getPayType()=="2013"?13:acqbean.getPayType())+"\"", m.get("notify_url"), "验证notify_url");
		Logger.verifyEquals("\"utf-8\"", m.get("_input_charset"), "验证_input_charset");
		Logger.verifyNotNull( m.get("sign"), "验证头条sign非空");
		Logger.verifyEquals("\"10d\"", m.get("it_b_pay"), "验证it_b_pay");
		Logger.verifyEquals("\""+acqbean.getProductName()+"\"", m.get("body"), "验证body");
		Logger.verifyEquals("\"1\"", m.get("payment_type"), "验证payment_type");
		Logger.verifyEquals("\"mobile.securitypay.pay\"", m.get("service"), "验证Service");
		Logger.verifyEquals("\"RSA\"", m.get("sign_type"), "验证sign_type");
		Logger.verifyEquals("\""+trandno+"\"", m.get("out_trade_no"), "验证out_trade_no");
		Logger.verifyEquals("\""+PayGateWayCallService.Alipay_LOGIN_MERID+"\"", m.get("partner"), "验证partner");
		Logger.verifyEquals("\"T\"", m.get("rn_check"), "验证rn_check");
		String ttf=m.get("total_fee").toString().replaceAll("\"", "");
		Logger.verifyEquals(true, TestDataManager.equalsBigDecimal(new BigDecimal(ttf), acqbean.getPayPrice()),
				"验证total_fee:" + m.get("total_fee"));
		Logger.verifyEquals("\"m.alipay.com\"", m.get("show_url"), "验证show_url");
		Logger.verifyEquals("\""+PayGateWayCallService.TouTiao_EMAIL+"\"", m.get("seller_id"), "验证seller_id");
	}
	private void verifyCMBResult(AcquireOrderBean acqbean, String result) throws Exception {
		Logger.comment("验证招行 Result");
		String st = TestDataManager.getRegexList(result, "(?<=signType\\\":\\\").*?(?=\")").get(0);//
		Logger.verifyEquals("SHA-256", st, "验证signType");
		String sign = TestDataManager.getRegexList(result, "(?<=sign\\\":\\\").*?(?=\")").get(0);//
		Logger.debug("sign:" + sign);
		String vt = TestDataManager.getRegexList(result, "(?<=version\\\":\\\").*?(?=\")").get(0);//
		Logger.verifyEquals("1.0", vt, "验证version");

		List<String> list = TestDataManager.getRegexList(result, "(?<=value=').*?(?=')");
		String jsonRequestData = list.get(0);
		HashMap mjsonRequestData = (HashMap) FormatUtil.GSONToObject(jsonRequestData, HashMap.class);
		HashMap mext = (HashMap) FormatUtil.GSONToObject(acqbean.getExt(), HashMap.class);

		String showmode = mext.get("SHOWMODE").toString();
		String paymethod = mext.get("PAYMETHOD").toString();
		int isHangzhou = Double.valueOf(mext.get("IsHangZhou").toString()).intValue();
		// {subject=自动化测试商品Tdje3wW6ux, sign_type=MD5,
		// notify_url=http://sit1.payment.ymatou.com/notify/10,
		// out_trade_no=393671933455900796208,
		// return_url=http://sit1.payment.ymatou.com/callback/10,
		// sign=d68b1115ca3d6aa843cccfa29d0c56c6,
		// _input_charset=utf-8, exter_invoke_ip=208.62.144.214,
		// buyer_info={&quot;needBuyerRealnamed&quot;:&quot;T&quot;},
		// total_fee=7.00, product_code=FAST_INSTANT_TRADE_PAY,
		// service=alipay.acquire.page.createandpay, paymethod=bankPay,
		// partner="+PayGateWayCallService.Alipay_MERID+", anti_phishing_key=KP3Do5rHfZeUDz5XTw==,
		// seller_email="+PayGateWayCallService.Alipay_EMAIL+", payment_type=1,
		// extend_parameters={&quot;qrPayMode&quot;:&quot;2&quot;}}
		MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
		String pid = ppm.getPaymentId();
		Logger.verifyEquals("SHA-256", mjsonRequestData.get("signType"), "验证signType");
		String env = EnvSetup.getEnv();
		String port = "8380";
		if (env.toLowerCase().equals("sit1")) {
			env = "sit";
			port = "8380";
		} else if (env.toLowerCase().equals("uat")) {
			port = "8480";
		}
		Logger.verifyEquals("UTF-8", mjsonRequestData.get("charset"), "验证charset");
		Logger.verifyEquals("1.0", mjsonRequestData.get("version"), "验证version");
		Map reqData = (Map) mjsonRequestData.get("reqData");
		Logger.debug(reqData);
		Logger.verifyEquals(Double.valueOf(acqbean.getPayPrice()), Double.valueOf(reqData.get("amount").toString()), "验证amount");

		Logger.verifyEquals(pid, reqData.get("orderNo").toString(), "验证paymentid");

		Logger.verifyNotNull(reqData.get("merchantSerialNo").toString(), "验证merchantSerialNo");
		Logger.verifyEquals("0021", reqData.get("branchNo").toString(), "验证branchNo");
		Logger.verifyEquals(YMTDateUtil.getSysTime("yyyyMMdd"), reqData.get("date").toString(), "验证date");
		Logger.verifyEquals(14, reqData.get("dateTime").toString().length(), "验证dateTime");
		Logger.verifyEquals("000157", reqData.get("merchantNo").toString(), "验证merchantNo");
		Logger.verifyEquals("Pay", reqData.get("payNoticePara").toString(), "验证payNoticePara");
		Logger.verifyEquals("http://116.228.41.4:8081/cmbPayNotify", reqData.get("payNoticeUrl").toString(), "验证payNoticeUrl");
		Logger.verifyEquals(acqbean.getCallbackUrl(), reqData.get("returnUrl").toString(), "验证returnUrl");
		Logger.verifyEquals("Sign", reqData.get("signNoticePara").toString(), "验证signNoticePara");
		Logger.verifyEquals("http://116.228.41.4:8081/cmbSignNotify", reqData.get("signNoticeUrl").toString(), "验证signNoticeUrl");
		Logger.verifyEquals(acqbean.getUserId(), reqData.get("userID").toString(), "验证userID");
		List<MCmbaggrement> agrlist = pdw.selectCmbAggrementByUId(acqbean.getUserId());
		Logger.verifyEquals(1, agrlist.size(), "验证CmbAggrement有签约记录");
		Logger.verifyEquals(agrlist.get(0).getId().toString(), reqData.get("agrNo").toString(), "验证agrNo");
		Logger.verifyEquals("0", agrlist.get(0).getAggStatus().toString(), "验证AggStatus");
		Map resetmap = new TreeMap();
		resetmap.putAll(reqData);
		String mysign = new Sign().signSHA256(resetmap, Sign.autoTestKey);
		// 收单未做mock 未能验签
		// Logger.verifyEquals(mysign, sign, "验证sign");
	}

	private void verifyWeixin(AcquireOrderBean acqbean, String string) throws InterruptedException {
		Logger.comment("验证微信JSAPI Result报文");
		HashMap mresult = (HashMap) FormatUtil.GSONToObject(string, HashMap.class);
		// "{\"AppID\":\"wxa06ebe9f39751792\",\"TimeStamp\":\"1460692208\",\"NonceStr\":\"a769d779901e4c539be975450a24beef\",\"Package\":\"prepay_id=wx201604151150101a3f453bb40847302088\",\"SignType\":\"MD5\",\"Sign\":\"973E138DC78EA558964D331E321E510B\"}","ResultType":"JSON"}
		if(!(acqbean.getPayType().equals("6001")||acqbean.getPayType().equals("6002")||acqbean.getPayType().equals("6003"))) {
			Logger.verifyNotNull(mresult.get("AppID"), "验证AppID");
			Logger.verifyNotNull(mresult.get("TimeStamp"), "验证TimeStamp非空");
			Logger.verifyEquals(true, mresult.get("TimeStamp").toString().length() == 10, "验证TimeStamp长度等于10");
			Logger.verifyNotNull(mresult.get("NonceStr"), "验证NonceStr非空");
			Logger.verifyEquals(true, mresult.get("NonceStr").toString().length() <= 32, "验证NonceStr长度小于32");
			Logger.verifyNotNull(mresult.get("Package"), "验证Package非空");
		}else {
			Logger.verifyNotNull(mresult.get("appId"), "验证AppID");
			Logger.verifyNotNull(mresult.get("timeStamp"), "验证TimeStamp非空");
			Logger.verifyEquals(true, mresult.get("timeStamp").toString().length() == 10, "验证TimeStamp长度等于10");
			Logger.verifyNotNull(mresult.get("nonceStr"), "验证NonceStr非空");
			Logger.verifyEquals(true, mresult.get("nonceStr").toString().length() <= 32, "验证NonceStr长度小于32");
			Logger.verifyNotNull(mresult.get("package"), "验证Package非空");
		}
		
		if(acqbean.getPayType().equals("3115")) {
			String appid=mresult.get("AppID").toString();
			String MerchantId=mresult.get("MerchantId").toString();
			Logger.verifyEquals(appid, PayGateWayCallService.WX_QQG_AppID_Could_15, "验证appid");
			Logger.verifyEquals(MerchantId, PayGateWayCallService.WX_QQG_merchantId_Could, "验证MerchantId");
		}
		else if(acqbean.getPayType().equals("3117")) {
			String appid=mresult.get("AppID").toString();
//			String MerchantId=mresult.get("MerchantId").toString();
			Logger.verifyEquals(appid, PayGateWayCallService.WX_QQG_AppID_Could_17, "验证appid");
//			Logger.verifyEquals(MerchantId, PayGateWayCallService.WX_QQG_merchantId_Could, "验证MerchantId");
		}else if	(acqbean.getPayType().equals("3215")) {
			String appid=mresult.get("AppID").toString();
			String MerchantId=mresult.get("MerchantId").toString();
			Logger.verifyEquals(appid, PayGateWayCallService.WX_QQG_AppID_Could_15_YDD, "验证appid");
			Logger.verifyEquals(MerchantId, PayGateWayCallService.WX_QQG_merchantId_Could, "验证MerchantId");
		}
		String sign = null;
		String mysign = null;
		
		String type=acqbean.getPayType();
		if(type.length()==4&&
				(!type.equals("6000")&&
						(!type.equals("6001"))&&
						(!type.equals("6002"))&&
						(!type.equals("6003"))&&
						(!type.equals("6103")&&
								(!type.equals("6107"))
								)
						)
				)
		{
			type=type.substring(2);
		}
		if (type.equals("15")||type.equals("19")) {
			Logger.verifyEquals("Sign=WXPay", mresult.get("Package"), "验证SignType");
			sign = mresult.get("Sign").toString();

			/*			String merchantId = mresult.get("MerchantId").toString();
			 * [SignAlias("appid")] public string AppID { get; set; }
			 * [SignAlias("partnerid")] public string MerchantId { get; set; }
			 * [SignAlias("prepayid")] public string PayToken { get; set; }
			 * [SignAlias("timestamp")] public string TimeStamp { get; set; }
			 * [SignAlias("noncestr")] public string NonceStr { get; set; }
			 * [SignAlias("package")] public string Package { get; set; }
			 * [SignIgnore] public string Sign { get; set; }
			 */
			//TODO Package=prepay_id=
			Map resetmap = new TreeMap();
			resetmap.put("appid", mresult.get("AppID"));
			resetmap.put("partnerid", mresult.get("MerchantId"));
			resetmap.put("prepayid", mresult.get("PayToken"));
			resetmap.put("timestamp", mresult.get("TimeStamp"));
			resetmap.put("package", mresult.get("Package"));
			resetmap.put("noncestr", mresult.get("NonceStr"));
			Logger.debug("15 resetmap:" + resetmap);
			mysign = new Sign().signMd5(resetmap, Sign.newweixinAppKey);
		} else if (type.equals("14")||type.equals("17")||type.equals("18")||type.equals("6000")||type.equals("6001")||type.equals("6002")) {
			
			if(type.equals("6001")||type.equals("6002")) {
				sign = mresult.get("paySign").toString();
				Logger.verifyEquals("MD5", mresult.get("signType"), "验证SignType");
			}else {
				sign = mresult.get("Sign").toString();
				Logger.verifyEquals("MD5", mresult.get("SignType"), "验证SignType");
			}
			/*
			 * [SignAlias("appId")] public string AppID { get; set; }
			 * [SignAlias("timeStamp")] public string TimeStamp { get; set; }
			 * [SignAlias("nonceStr")] public string NonceStr { get; set; }
			 * [SignAlias("package")] public string Package { get; set; }
			 * [SignAlias("signType")] public string SignType { get; set; }
			 * [SignIgnore] public string Sign { get; set; }
			 */
			
			Map resetmap = new TreeMap();
			if(type.equals("6001")||type.equals("6002")) {
				resetmap.put("appId", mresult.get("appId"));
				resetmap.put("timeStamp", mresult.get("timeStamp"));
				resetmap.put("package", mresult.get("package"));
				resetmap.put("nonceStr", mresult.get("nonceStr"));
				resetmap.put("signType", mresult.get("signType"));
			}else  {
				resetmap.put("appId", mresult.get("AppID"));
				resetmap.put("timeStamp", mresult.get("TimeStamp"));
				resetmap.put("package", mresult.get("Package"));
				resetmap.put("nonceStr", mresult.get("NonceStr"));
				resetmap.put("signType", mresult.get("SignType"));
				}
			Logger.debug("14 resetmap:" + resetmap);
			mysign = new Sign().signMd5(resetmap, Sign.newweixinJSAPIKey);
			if(type.equals("17")){
				String prepay_id=mresult.get("Package").toString().split("=")[1];
				MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
				Logger.comment("payment:"+FormatUtil.beanToGSONString(ppm));
				Logger.verifyNotNull(prepay_id,"验证有返回prepay_id");
				Logger.verifyEquals(prepay_id, ppm.getInstProxyPaymentId(),"验证prepay_id");
			}
			if(type.equals("6000")){
				String prepay_id=mresult.get("Package").toString().split("=")[1];
				MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
				Logger.comment("payment:"+FormatUtil.beanToGSONString(ppm));
				Logger.verifyNotNull(prepay_id,"验证有返回prepay_id");
				Logger.verifyEquals(prepay_id, ppm.getInstProxyPaymentId(),"验证prepay_id");
			}
			if(type.equals("6001")||type.equals("6002")){
				String prepay_id=mresult.get("package").toString().split("=")[1];
				MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
				Logger.comment("payment:"+FormatUtil.beanToGSONString(ppm));
				Logger.verifyNotNull(prepay_id,"验证有返回prepay_id");
				//prepay_id已回调返回的为准
//				Logger.verifyEquals(prepay_id, ppm.getInstProxyPaymentId(),"验证prepay_id");
			}
		}
		//6000 HipoPayWxApp 的签名和其他的不同 暂时不验证
		if(!(type.equals("6000")||type.equals("6001")||type.equals("6002")||type.equals("6003")||type.equals("6103")||type.equals("6107"))) {
			Logger.verifyEquals(mysign.toLowerCase(), sign.toLowerCase(), "验证Sign");
		}
	}

	/**
	 * 验证默认返回信息
	 * 
	 * @throws Exception
	 */
	private void verifyDefReturn() throws Exception {
		Logger.comment("验证默认返回报文");
		Logger.verifyEquals("0", acquireorderCall.getString("ErrorCode"), "验证ErrorCode");
		Logger.verifyEquals(acquireorderBean.getVersion(), acquireorderCall.getString("Version"), "验证Version");
		Logger.verifyEquals(acquireorderBean.getAppId(), acquireorderCall.getString("AppId"), "验证AppId");
		Logger.verifyEquals(acquireorderBean.getTraceId(), acquireorderCall.getString("TraceId").toString(), "验证TraceId");
	}

	/**
	 * 验证alipayapp 返回
	 * 
	 * @param acqbean
	 * @param result
	 * @throws Exception
	 */
	private void verifyAlipayApp(AcquireOrderBean acqbean, String result) throws Exception {
		Logger.comment("验证支付宝APP Result报文");
		HashMap mext = (HashMap) FormatUtil.GSONToObject(acqbean.getExt(), HashMap.class);
		int isHangzhou = Double.valueOf(mext.get("IsHangZhou").toString()).intValue();
		Map m = (Map) FormatUtil.GSONToObject(acquireorderCall.getString("Result"), Map.class);
		Logger.verifyNotNull(m.get("Sign"), "验证Sign非空");
		if(acqbean.getPayType().length()==4) {
			Logger.verifyEquals(PayGateWayCallService.Alipay_MERID, m.get("Partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.Alipay_EMAIL, m.get("SellerId"), "验证SellerId买家支付宝账号");
		}else if(acqbean.getPayType().length()==1) {
			PayGateWayCallService.initYMatouMERID();
			Logger.verifyEquals(PayGateWayCallService.Alipay_MERID, m.get("Partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.Alipay_EMAIL, m.get("SellerId"), "验证SellerId买家支付宝账号");
		}
		MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
		String trandno = ppm.getPaymentId();
		Logger.verifyEquals(trandno, m.get("OutTradeNo"), "验证OutTradeNo");
		Logger.verifyEquals(acqbean.getProductName(), m.get("Subject"), "验证Subject");
		Logger.verifyNotEquals("null", m.get("Body").toString(), "验证Body-不为null");
		Logger.verifyEquals(true, TestDataManager.equalsBigDecimal(new BigDecimal(m.get("TotalFee").toString()), acqbean.getPayPrice()), "验证total_fee:" + m.get("TotalFee"));
		String env = EnvSetup.getEnv();
		String port = "8380";
		if (env.toLowerCase().equals("sit1")) {
			env = "sit";
			port = "8380";
		} else if (env.toLowerCase().equals("uat")) {
			port = "8480";
		}
		Logger.verifyEquals("http://" + env + ".payment.ymatou.com:" + port + "/notify/" + acqbean.getPayType(), m.get("NotifyUrl"), "验证NotifyUrl");
		Logger.verifyEquals("mobile.securitypay.pay", m.get("Service"), "验证Service");
		Logger.verifyEquals("1", m.get("PaymentType"), "验证PaymentType");
		Logger.verifyEquals("utf-8", m.get("InputCharset"), "验证InputCharset");
		Logger.verifyEquals("10d", m.get("ItBPay"), "验证ItBPay");
		Logger.verifyEquals("RSA", m.get("SignType"), "验证SignType");
		Logger.verifyEquals(true, m.get("QuerySuccess"), "验证QuerySuccess");
		Logger.verifyEquals("成功", m.get("Message"), "验证Message");
		Logger.comment("验证EncryptStr");
		Map mencrypt = FormatUtil.httpStringToMap(m.get("EncryptStr").toString());
		Logger.verifyNotNull(mencrypt.get("sign"), "验证Sign非空");
		if(acqbean.getPayType().length()==4) {
			Logger.verifyEquals(PayGateWayCallService.Alipay_MERID, mencrypt.get("partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.Alipay_EMAIL, mencrypt.get("seller_id"), "验证seller_id买家支付宝账号");
		}else if(acqbean.getPayType().length()==1) {
			PayGateWayCallService.initYMatouMERID();
			Logger.verifyEquals(PayGateWayCallService.Alipay_MERID, mencrypt.get("partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.Alipay_EMAIL, mencrypt.get("seller_id"), "验证seller_id买家支付宝账号");
		}
		Logger.verifyEquals(trandno, mencrypt.get("out_trade_no"), "验证out_trade_no");
		Logger.verifyEquals(acqbean.getProductName(), mencrypt.get("subject"), "验证subject");
		Logger.verifyEquals(acqbean.getProductName(), mencrypt.get("body"), "验证body");
		Logger.verifyEquals(true, TestDataManager.equalsBigDecimal(new BigDecimal(mencrypt.get("total_fee").toString()), acqbean.getPayPrice()),
				"验证total_fee:" + mencrypt.get("total_fee"));
		Logger.verifyEquals("http://" + env + ".payment.ymatou.com:" + port + "/notify/" + acqbean.getPayType(), mencrypt.get("notify_url"), "验证notify_url");
		Logger.verifyEquals("mobile.securitypay.pay", mencrypt.get("service"), "验证service");
		Logger.verifyEquals("1", mencrypt.get("payment_type"), "验证payment_type");
		Logger.verifyEquals("utf-8", mencrypt.get("_input_charset"), "验证_input_charset");
		Logger.verifyEquals("10d", mencrypt.get("it_b_pay"), "验证it_b_pay");
		Logger.verifyEquals("RSA", mencrypt.get("sign_type"), "验证sign_type");
		Logger.verifyEquals("m.alipay.com", mencrypt.get("show_url"), "验证show_url");
		// 杭保实名，非杭保不验
		if (isHangzhou == 1) {
			Logger.verifyEquals("T", mencrypt.get("rn_check"), "验证rn_check");
		}
		Logger.verifyNotNull(mencrypt.get("sign"), "验证sign非空");
		if (acqbean.getPayType().equals("9")||acqbean.getPayType().equals("1009")) {
			Logger.verifyNotNull(mencrypt.get("hb_fq_param"), "验证hb_fq_param非空");
			HbFq hbfq = (HbFq) FormatUtil.GSONToObject(mencrypt.get("hb_fq_param").toString(), HbFq.class);
			;
			Logger.verifyEquals("0", hbfq.getHb_fq_seller_percent(), "验证hb_fq_seller_percent");
			Logger.verifyEquals(acqbean.getInstallmentNum().toString(), hbfq.getHb_fq_num(), "验证hb_fq_num");
			// hb_fq_param
		}
		//花呗全款标签
		if(acqbean.getPayType().equals("8")) {
			Logger.verifyEquals("pcredit", mencrypt.get("specified_channel"), "验证specified_channel");
		}
	}
	/**
	 * 验证alipayapp 返回
	 * 全球优选-洋云专用
	 * 
	 * @param acqbean
	 * @param result
	 * @throws Exception
	 */
	private void verifyAlipayAppYoungCloud(AcquireOrderBean acqbean, String result) throws Exception {
		Logger.comment("验证支付宝APP Result报文");
		HashMap mext = (HashMap) FormatUtil.GSONToObject(acqbean.getExt(), HashMap.class);
		int isHangzhou = Double.valueOf(mext.get("IsHangZhou").toString()).intValue();
		Map m = (Map) FormatUtil.GSONToObject(acquireorderCall.getString("Result"), Map.class);
		Logger.verifyNotNull(m.get("Sign"), "验证Sign非空");
		if(acqbean.getPayType().length()==4) {
			Logger.verifyEquals(PayGateWayCallService.Alipay_MERID_Could, m.get("Partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.Alipay_EMAIL_Could, m.get("SellerId"), "验证SellerId买家支付宝账号");
		}else if(acqbean.getPayType().length()==1) {
			PayGateWayCallService.initYMatouMERID();
			Logger.verifyEquals(PayGateWayCallService.Alipay_MERID_Could, m.get("Partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.Alipay_EMAIL_Could, m.get("SellerId"), "验证SellerId买家支付宝账号");
		}
		MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
		String trandno = ppm.getPaymentId();
		Logger.verifyEquals(trandno, m.get("OutTradeNo"), "验证OutTradeNo");
		Logger.verifyEquals(acqbean.getProductName(), m.get("Subject"), "验证Subject");
		Logger.verifyNotEquals("null", m.get("Body").toString(), "验证Body-不为null");
		Logger.verifyEquals(true, TestDataManager.equalsBigDecimal(new BigDecimal(m.get("TotalFee").toString()), acqbean.getPayPrice()), "验证total_fee:" + m.get("TotalFee"));
		String env = EnvSetup.getEnv();
		String port = "8380";
		if (env.toLowerCase().equals("sit1")) {
			env = "sit";
			port = "8380";
		} else if (env.toLowerCase().equals("uat")) {
			port = "8480";
		}
		Logger.verifyEquals("http://" + env + ".payment.ymatou.com:" + port + "/notify/" + acqbean.getPayType(), m.get("NotifyUrl"), "验证NotifyUrl");
		Logger.verifyEquals("mobile.securitypay.pay", m.get("Service"), "验证Service");
		Logger.verifyEquals("1", m.get("PaymentType"), "验证PaymentType");
		Logger.verifyEquals("utf-8", m.get("InputCharset"), "验证InputCharset");
		Logger.verifyEquals("10d", m.get("ItBPay"), "验证ItBPay");
		Logger.verifyEquals("RSA", m.get("SignType"), "验证SignType");
		Logger.verifyEquals(true, m.get("QuerySuccess"), "验证QuerySuccess");
		Logger.verifyEquals("成功", m.get("Message"), "验证Message");
		Logger.comment("验证EncryptStr");
		Map mencrypt = FormatUtil.httpStringToMap(m.get("EncryptStr").toString());
		Logger.verifyNotNull(mencrypt.get("sign"), "验证Sign非空");
		if(acqbean.getPayType().length()==4) {
			Logger.verifyEquals(PayGateWayCallService.Alipay_MERID_Could, mencrypt.get("partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.Alipay_EMAIL_Could, mencrypt.get("seller_id"), "验证seller_id买家支付宝账号");
		}else if(acqbean.getPayType().length()==1) {
			PayGateWayCallService.initYMatouMERID();
			Logger.verifyEquals(PayGateWayCallService.Alipay_MERID_Could, mencrypt.get("partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.Alipay_EMAIL_Could, mencrypt.get("seller_id"), "验证seller_id买家支付宝账号");
		}
		Logger.verifyEquals(trandno, mencrypt.get("out_trade_no"), "验证out_trade_no");
		Logger.verifyEquals(acqbean.getProductName(), mencrypt.get("subject"), "验证subject");
		Logger.verifyEquals(acqbean.getProductName(), mencrypt.get("body"), "验证body");
		Logger.verifyEquals(true, TestDataManager.equalsBigDecimal(new BigDecimal(mencrypt.get("total_fee").toString()), acqbean.getPayPrice()),
				"验证total_fee:" + mencrypt.get("total_fee"));
		Logger.verifyEquals("http://" + env + ".payment.ymatou.com:" + port + "/notify/" + acqbean.getPayType(), mencrypt.get("notify_url"), "验证notify_url");
		Logger.verifyEquals("mobile.securitypay.pay", mencrypt.get("service"), "验证service");
		Logger.verifyEquals("1", mencrypt.get("payment_type"), "验证payment_type");
		Logger.verifyEquals("utf-8", mencrypt.get("_input_charset"), "验证_input_charset");
		Logger.verifyEquals("10d", mencrypt.get("it_b_pay"), "验证it_b_pay");
		Logger.verifyEquals("RSA", mencrypt.get("sign_type"), "验证sign_type");
		Logger.verifyEquals("m.alipay.com", mencrypt.get("show_url"), "验证show_url");
		// 杭保实名，非杭保不验
		if (isHangzhou == 1) {
			Logger.verifyEquals("T", mencrypt.get("rn_check"), "验证rn_check");
		}
		Logger.verifyNotNull(mencrypt.get("sign"), "验证sign非空");
		if (acqbean.getPayType().equals("9")||acqbean.getPayType().equals("1009")) {
			Logger.verifyNotNull(mencrypt.get("hb_fq_param"), "验证hb_fq_param非空");
			HbFq hbfq = (HbFq) FormatUtil.GSONToObject(mencrypt.get("hb_fq_param").toString(), HbFq.class);
			;
			Logger.verifyEquals("0", hbfq.getHb_fq_seller_percent(), "验证hb_fq_seller_percent");
			Logger.verifyEquals(acqbean.getInstallmentNum().toString(), hbfq.getHb_fq_num(), "验证hb_fq_num");
			// hb_fq_param
		}
		//花呗全款标签
		if(acqbean.getPayType().equals("8")) {
			Logger.verifyEquals("pcredit", mencrypt.get("specified_channel"), "验证specified_channel");
		}
	}
	private void verifyFql(AcquireOrderBean acqbean, String result) throws Exception {
		Logger.comment("验证分期乐 Result报文");
//		token	否	string	用于用户免密注册token。
//		phone	否	string	用户phone
//		agent	是	string	分期乐分配
//		reserve_order_id	否	string	预订单号如果非支付场景，则无该参数
//		third_uid	是	string	用户在商户侧唯一id
//		scene	是	string	流程场景1：支付场景2：仅开通额度场景
//		channel	是	string	注册页channel
//		client_id	否	string	分期乐分期
		HashMap mext = (HashMap) FormatUtil.GSONToObject(acqbean.getExt(), HashMap.class);
		int isHangzhou = Double.valueOf(mext.get("IsHangZhou").toString()).intValue();
		Map m = (Map) FormatUtil.GSONToObject(acquireorderCall.getString("Result"), Map.class);
		//"Result":"{\"token\":\"T201906256ce0bea3001a29682c484e881fcdcd38\",\"phone\":\"15000514016\",\"agent\":\"1090986\",\"reserve_order_id\":\"BRO20190625174245000003\",\"third_uid\":\"20336470\",\"scene\":\"1\",\"channel\":\"leka\",\"client_id\":\"ceshisan\",\"flag\":\"1\",\"scope\":\"snsapi_base\",\"modify_phone\":\"0\"}"
		MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
		String trandno = ppm.getPaymentId();
		Logger.verifyEquals(acqbean.getUserId(), m.get("third_uid"), "验证third_uid");
		Logger.verifyEquals(PayGateWayCallService.FQLAgent.toString(), m.get("agent"), "验证agent");
		//
		Logger.verifyEquals("1", m.get("scene"), "验证scene1支付场景");
		Logger.verifyNotNull(m.get("token"), "验证token");
		Logger.verifyNotNull(m.get("reserve_order_id"), "验证token");
		Logger.verifyNotNull(m.get("client_id"), "验证client_id");
		Logger.verifyNotNull(m.get("channel"), "验证channel");
		Logger.debug(FormatUtil.beanToGSONString(ppm));
	}
	/**
	 * 校验Html Form返回 支付宝PC支付
	 * 
	 * @param acqbean
	 * @param result
	 * @throws Exception
	 */
	private void verifyHtmlResult(AcquireOrderBean acqbean, String result) throws Exception {
		Logger.comment("验证支付宝PC Result");
		Logger.verifyIsContains("meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"", result, "验证报文头");
		Map m = new TreeMap<String, String>();
		List<String> namelist = TestDataManager.getRegexList(result, "(?<=name=\").*?(?=\")");
		List<String> valuelist = TestDataManager.getRegexList(result, "(?<=value=\").*?(?=\")");

		if (valuelist.size() == namelist.size()) {
			for (int i = 0; i < namelist.size(); i++) {
				m.put(namelist.get(i), valuelist.get(i));
			}
		} else {
			throw new Exception("verifyResult失败，结果集name value 不匹配");
		}

		HashMap mext = (HashMap) FormatUtil.GSONToObject(acqbean.getExt(), HashMap.class);
		String showmode = mext.get("SHOWMODE").toString();
		String paymethod = mext.get("PAYMETHOD").toString();
		int isHangzhou = Double.valueOf(mext.get("IsHangZhou").toString()).intValue();
		// {subject=自动化测试商品Tdje3wW6ux, sign_type=MD5,
		// notify_url=http://sit1.payment.ymatou.com/notify/10,
		// out_trade_no=393671933455900796208,
		// return_url=http://sit1.payment.ymatou.com/callback/10,
		// sign=d68b1115ca3d6aa843cccfa29d0c56c6,
		// _input_charset=utf-8, exter_invoke_ip=208.62.144.214,
		// buyer_info={&quot;needBuyerRealnamed&quot;:&quot;T&quot;},
		// total_fee=7.00, product_code=FAST_INSTANT_TRADE_PAY,
		// service=alipay.acquire.page.createandpay, paymethod=bankPay,
		// partner="+PayGateWayCallService.Alipay_MERID+", anti_phishing_key=KP3Do5rHfZeUDz5XTw==,
		// seller_email="+PayGateWayCallService.Alipay_EMAIL+", payment_type=1,
		// extend_parameters={&quot;qrPayMode&quot;:&quot;2&quot;}}

		MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
		String trandno = ppm.getPaymentId();
		Logger.verifyEquals(acqbean.getProductName(), m.get("subject"), "验证subject");
		Logger.verifyEquals(acqbean.getProductName(), m.get("body"), "验证body");
		Logger.verifyEquals(acqbean.getSignMethod(), m.get("sign_type"), "验证sign_type");
		String env = EnvSetup.getEnv();
		String port = "8380";
		if (env.toLowerCase().equals("sit1")) {
			env = "sit";
			port = "8380";
		} else if (env.toLowerCase().equals("uat")) {
			port = "8480";
		}
		Logger.verifyEquals("http://" + env + ".payment.ymatou.com:" + port + "/notify/" + acqbean.getPayType(), m.get("notify_url"), "验证notify_url");
		Logger.verifyEquals(trandno, m.get("out_trade_no"), "验证out_trade_no");
		if(acqbean.getPayType().equals("6100")){
//			http://www.ymatou.com/pay/result
				Logger.verifyEquals("http://www.ymatou.com/pay/result" , m.get("return_url"), "验证return_url");
		}else {
			Logger.verifyEquals("http://" + env + ".payment.ymatou.com:" + port + "/callback/" + acqbean.getPayType(), m.get("return_url"), "验证return_url");
		}

		Logger.verifyEquals("utf-8", m.get("_input_charset"), "验证_input_charset");
		Logger.verifyEquals(acqbean.getUserIp(), m.get("exter_invoke_ip"), "验证exter_invoke_ip");
		Logger.verifyEquals(true, TestDataManager.equalsBigDecimal(new BigDecimal(m.get("total_fee").toString()), acqbean.getPayPrice()), "验证total_fee:" + m.get("total_fee"));
		// TODO ?
		// AcquireOrderRequest.Ext.PAYMETHOD creditCard、bankPay、directPay
		if (isHangzhou == 1) {
			Logger.comment("验证杭保信息");
			Logger.verifyEquals("{&quot;needBuyerRealnamed&quot;:&quot;T&quot;}", m.get("buyer_info"), "验证buyer_info买家信息");
			Logger.verifyEquals("alipay.acquire.page.createandpay", m.get("service"), "验证service统一下单并支付");
			Logger.verifyEquals("FAST_INSTANT_TRADE_PAY", m.get("product_code"), "验证product_code订单业务类型");
			Logger.verifyEquals("{&quot;qrPayMode&quot;:&quot;" + showmode + "&quot;}", m.get("extend_parameters"), "验证extend_parameters公用业务扩展信息");
		} else {
			Logger.comment("验证非杭保信息");
			// mysql重构去除
			// Logger.verifyEquals(acqbean.getBankId(), m.get("defaultbank"),
			// "验证defaultbank默认银行");
			Logger.verifyEquals("create_direct_pay_by_user", m.get("service"), "验证service统一下单并支付");
			Logger.verifyEquals(acqbean.getThirdPartyUserId() == null ? "N" : "Y", m.get("default_login"), "验证default_login默认登录");
			if(acqbean.getPayType().equals("6100")) {
				Logger.verifyEquals("0", m.get("qr_pay_mode"), "验证qr_pay_mode扫码方式");
			}
			else {
				Logger.verifyEquals(showmode, m.get("qr_pay_mode"), "验证qr_pay_mode扫码方式");
			}
		}
		Logger.comment("验证paymethod");
		if (paymethod.equals("1")) {
			Logger.verifyEquals("creditCard", m.get("paymethod"), "验证paymethod");
		} else if (paymethod.equals("2")) {
			Logger.verifyEquals("bankPay", m.get("paymethod"), "验证paymethod");
		} else if (paymethod.equals("3")) {
			Logger.verifyEquals("directPay", m.get("paymethod"), "验证paymethod");
		}

		// 固定
		if(!acqbean.getPayType().equals("6100")) {
			Logger.verifyEquals(PayGateWayCallService.Alipay_MERID, m.get("partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.Alipay_EMAIL, m.get("seller_email"), "验证seller_email买家支付宝账号");
		}else {
			Logger.verifyEquals(PayGateWayCallService.GODAliPay_MERID, m.get("partner"), "验证partner合作者身份ID");
			Logger.verifyEquals(PayGateWayCallService.GODAliPay_EMAIL, m.get("seller_email"), "验证seller_email买家支付宝账号");
		}
		Logger.verifyNotNull(m.get("anti_phishing_key"), "验证anti_phishing_key防钓鱼时间戳");
		Logger.verifyEquals("1", m.get("payment_type"), "验证payment_type 1（商品购买）");

		Logger.debug("map:" + m);
		Logger.verifyNotNull(m.get("sign"), "验证sign非空");
		String sign = m.get("sign").toString();
		// 签名处理-去除sign sign_type 杭保信息 buyer_info 和 extend_parameters需要做&quot;
		// 转换"
		m.remove("sign_type");
		m.remove("sign");
		if (m.get("buyer_info") != null) {
			m.put("buyer_info", m.get("buyer_info").toString().replaceAll("&quot;", "\""));
		}
		if (m.get("extend_parameters") != null) {
			m.put("extend_parameters", m.get("extend_parameters").toString().replaceAll("&quot;", "\""));
		}
		Logger.debug("map2:" + m);
		if (acqbean.getSignMethod().equals("RSA")) {
			String src = FormatUtil.mapToHttpString(m, false);
			String mysign = new Sign().SignSHA1WithRSA(src);
			Logger.verifyEquals(mysign, sign, "验证sign");
		} else {
			String mysign = new Sign().signMd5NoAndKey(m, Sign.autoTestKey);
			Logger.verifyEquals(mysign, sign, "验证sign");
		}
	}
	/**
	 * 校验Html Form返回 银联
	 * 
	 * @param acqbean
	 * @param result
	 * @throws Exception
	 */
	private void verifyUPayHtmlResult(AcquireOrderBean acqbean, String result) throws Exception {
		Logger.comment("验证UPay Wap Result");
		Logger.verifyIsContains("meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"", result, "验证报文头");
		Map m = new TreeMap<String, String>();
		List<String> namelist = TestDataManager.getRegexList(result, "(?<=name=\").*?(?=\")");
		List<String> valuelist = TestDataManager.getRegexList(result, "(?<=value=\").*?(?=\")");

		if (valuelist.size() == namelist.size()) {
			for (int i = 0; i < namelist.size(); i++) {
				m.put(namelist.get(i), valuelist.get(i));
			}
		} else {
			throw new Exception("verifyResult失败，结果集name value 不匹配");
		}
		//{accessType=0, backUrl=http://sit.payment.ymatou.com:8380/notify/63, bizType=000201, certId=73657647234, channelType=08, currencyCode=156, encoding=UTF-8, 
		//frontUrl=http://sit.payment.ymatou.com:8380/callback/63, merId=310310153990890, orderId=18082318115265701, signMethod=01, 
		//signature=CMU1tnTeVg4J6siMlyRJqkvaEjqk0GMlVhr1cZjyI9BkLg5GOh1xp9kMl+8MURyofOHo47VHNK1zBowPn/q2bwjRaCcTPo8qMdDJ7irovKcfR9qdc0c7xRFhVUAPL4p9ZEzbgPDnltI6BprX5AZs/xAmLMhFCkfBa3nw1ngseoVQZ7+C6WJcMcbG8n7/po5I7YK25eHG1++Mk/e1dPfG1GG7MSn0quF1hRJLuSUfpDUUpaZ5kn3oR0wfouwxtv9Hqakbi4+zmBzJmn1SAGfuHG2im6HtuS4bjzbyrQygrMEZU7TBbIpR0IA3jZbGH3UfjzSKRVwC00LWTF4Yu1mMdg==, 
		//txnAmt=200, txnSubType=01, txnTime=20180823181152, txnType=01, version=5.0.0}

		HashMap mext = (HashMap) FormatUtil.GSONToObject(acqbean.getExt(), HashMap.class);
		String showmode = mext.get("SHOWMODE").toString();
		String paymethod = mext.get("PAYMETHOD").toString();
		int isHangzhou = Double.valueOf(mext.get("IsHangZhou").toString()).intValue();

		MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
		String trandno = ppm.getPaymentId();
		String env = EnvSetup.getEnv();
		String port = "8380";
		if (env.toLowerCase().equals("sit1")) {
			env = "sit";
			port = "8380";
		} else if (env.toLowerCase().equals("uat")) {
			port = "8480";
		}
		Logger.verifyEquals("http://" + env + ".payment.ymatou.com:" + port + "/notify/" + acqbean.getPayType(), m.get("backUrl"), "验证backUrl");
		Logger.verifyEquals(trandno, m.get("orderId"), "验证orderId");

		Logger.verifyEquals("http://" + env + ".payment.ymatou.com:" + port + "/unionPayCallback", m.get("frontUrl"), "验证frontUrl");

		Logger.verifyEquals("utf-8", m.get("encoding").toString().toLowerCase(), "验证encoding");
		Logger.verifyEquals( new BigDecimal(acqbean.getPayPrice()).multiply(new BigDecimal("100")).setScale(0), new BigDecimal(m.get("txnAmt").toString()).setScale(0), "验证txnAmt:" + m.get("txnAmt"));
		// 固定数据
		//0：普通商户直连接入 1：收单机构接入
		Logger.verifyEquals("0", m.get("accessType"), "验证accessType");
		//固定填写：000201：B2C 网关支付 
		Logger.verifyEquals("000201", m.get("bizType"), "验证bizType");
		Logger.verifyEquals(PayGateWayCallService.UPAY_CertId, m.get("certId"), "验证certId");
		Logger.verifyEquals("08", m.get("channelType"), "验证channelType");
		Logger.verifyEquals("156", m.get("currencyCode"), "验证currencyCode");
		Logger.verifyEquals(PayGateWayCallService.UPAY_MERID, m.get("merId"), "验证merId");
		//RSA
		Logger.verifyEquals("01", m.get("signMethod"), "验证signMethod");
		//01：自助消费
		Logger.verifyEquals("01", m.get("txnSubType"), "验证txnSubType");
		//01：消费
		Logger.verifyEquals("01", m.get("txnType"), "验证txnType");
		Logger.verifyEquals("5.0.0", m.get("version"), "验证version");
		Logger.verifyNotNull(m.get("txnTime"),  "验证txnTime");
	}
	private void verifyBestpayResult(AcquireOrderBean acqbean, String result) throws Exception {
		Logger.comment("验证翼支付Result");
		Logger.verifyIsContains(true, result.startsWith("https://capi.bestpay.com.cn/gateway.pay"), "验证url");
		result=result.substring(result.indexOf('?')+1);
		Map m =FormatUtil.httpStringToMapSplitAnd(result);
		Logger.verifyEquals("wap_3.0", m.get("platform").toString(), "验证platform");
		Logger.verifyNotNull(m.get("encryStr"), "验证encryStr");
		Logger.debug(m);
		
	}
	private void verifyDB(AcquireOrderBean acqbean) throws InterruptedException {
		Logger.comment("验证表pp_payment");
		MPayment ppm = new PayGateWayWapper().selectPaymentByTradingid(acqbean.getOrderId()).get(0);
		if(acqbean.getAppName()!=null) {
			Logger.verifyEquals(acqbean.getAppName(), ppm.getGodAppName(), "验证GodAppName");
		}
		Logger.verifyEquals(acqbean.getAppId(), ppm.getAppId(), "验证AppId");

		Logger.verifyEquals(acqbean.getSignMethod(), ppm.getSignMethod(), "验证SignMethod");
		if(acqbean.getPayType().equals("3017")) {
			Logger.verifyEquals("3117", ppm.getPayType().toString(), "验证PayType");
		}else {
			Logger.verifyEquals(acqbean.getPayType(), ppm.getPayType().toString(), "验证PayType");
		}

		Logger.verifyEquals(acqbean.getUserId(), ppm.getUserId().toString(), "验证UserId");

		Logger.verifyEquals(acqbean.getUserIp(), ppm.getClientIp(), "验证ClientIp");
		Logger.verifyEquals(acqbean.getCallbackUrl(), ppm.getCallbackUrl(), "验证CallbackUrl");
		Logger.verifyEquals(acqbean.getNotifyUrl(), ppm.getNotifyUrl(), "验证NotifyUrl");
		Logger.verifyEquals(acqbean.getOrderId(),ppm.getTradingId(),"验证tradingid");
		if(acqbean.getPayType().equals("6000")||acqbean.getPayType().equals("6001")||acqbean.getPayType().equals("6002")||acqbean.getPayType().equals("6010")||acqbean.getPayType().equals("6011")) {
			Logger.verifyEquals(acqbean.getOpenId(), ppm.getPayerId(), "验证OpenId");
		}
		// 以下是支付网关mysql数据库重构没有的字段 20180110
		// Logger.verifyEquals(acqbean.getOriginAppId(), ppm.getOriginAppId(),
		// "验证OriginAppId");
		// Logger.verifyEquals(acqbean.getOrderId(), ppm.getOrderId(),
		// "验证OrderId");
		// Logger.verifyEquals(true,
		// TestDataManager.equalsBigDecimal(ppm.getOrderPrice(),
		// acqbean.getPayPrice()),
		// "验证PayPrice:" + ppb.getOrderPrice());
		// Logger.verifyEquals(acqbean.getCurrency(), ppm.getCurrencyType(),
		// "验证CurrencyType");
		// Logger.verifyEquals(acqbean.getVersion(),
		// ppm.getVersion().toString(), "验证Version");
		// Logger.verifyEquals(acqbean.getTraceId(), ppm.getTraceId(),
		// "验证TraceId");
		// Logger.verifyEquals(acqbean.getOrderTime(), ppm.getOrderTime(),
		// "验证OrderTime");
		// Logger.verifyEquals(acqbean.getProductName(), ppm.getProductName(),
		// "验证ProductName");
		// Logger.verifyEquals(acqbean.getEncoding(),
		// ppm.getCodePage().toString(), "验证CodePage");
		// Logger.verifyEquals(acqbean.getExt(), ppm.getExt(), "验证Ext");
		// Logger.verifyEquals(acqbean.getBizCode(),
		// ppm.getBizCode().toString(), "验证BizCode");
		// Logger.verifyEquals(PayStatusEnum.Init.getValue(),
		// ppm.getOrderStatus(), "验证OrderStatus");
		// Logger.verifyEquals(acqbean.getMemo(), ppm.getMemo(), "验证Memo");
		// Logger.verifyEquals(acqbean.getCurrency(), ppm.getPayCurrencyType(),
		// "验证PayCurrencyType");
		// Logger.verifyEquals(acqbean.getBankId(), ppm.getBankId(),
		// "验证BankId");

		Logger.verifyNotNull(ppm.getPaymentId(), "验证PaymentId");
		if (acqbean.getPayType() != "50") {
			Logger.verifyEquals(17, ppm.getPaymentId().length(), "验证PaymentId长度17位");
		} else {
			Logger.verifyEquals(10, ppm.getPaymentId().length(), "验证PaymentId长度10位");
		}
		
//		Logger.verifyEquals(acqbean.getPayType(), ppm.getPayType().toString(), "验证PayType");
		Logger.verifyEquals(true, TestDataManager.equalsBigDecimal(ppm.getOrderAmt(), acqbean.getPayPrice()), "验证PayPrice:" + ppm.getOrderAmt());
		Logger.verifyEquals(PayOrderEnum.Init.getValue(), ppm.getPayStatus(), "验证PayStatus");
		if(acqbean.getPayType().equals("6000")||acqbean.getPayType().equals("6001")||acqbean.getPayType().equals("6002")) {
			Logger.verifyEquals(acqbean.getSettleCurrency(), ppm.getSettleCurrency(), "验证SettleCurrency");
			if(acqbean.getPriceCurrency()!=null) {
				Logger.verifyEquals(acqbean.getPriceCurrency(), ppm.getPriceCurrency(), "验证PriceCurrency");
			}
			if(acqbean.getPayType().equals("6000")||acqbean.getPayType().equals("6001")) {
				Logger.verifyEquals(PayGateWayCallService.GdDefMerchantNo, ppm.getMerchantNo(), "验证MerchantNo");
			}
			//目前固定MerchantNo
			else {
				Logger.verifyEquals(PayGateWayCallService.GdDefMerchantNo_6002, ppm.getMerchantNo(), "验证MerchantNo");
			}
			
		}
		// 下列字段回调时才有
		// InstitutionPaymentId null
		// ActualPayCurrencyType null
		// ExchangeRate null
		// CardType NULL
		// PayerId NULL
		// CheckStatus ?
	}
}